<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class IndexCouncilComplaintsParentSubmitRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //
			'type'		=> 'required',
			'title'		=> 'required',
			'content'	=> 'required|min:10'
        ];
    }
    
    public function messages(){
    	return [
			'type.required'		=> '请选择留言类型',
			'title.required'	=> '请添加留言标题',
			'content.required'	=> '请填写留言内容',
			'content.min'		=> '内容太少了，多写一点吧',
		];
	}
}
